package com.yesep.learn.kafka.consumer;

import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

import com.yesep.learn.kafka.common.TOPIC;

@Component
public class TestConsumer {

	@KafkaListener(topics = TOPIC.TEST_TOPIC)
	public void listen(ConsumerRecord<?, ?> record) throws Exception {
		System.out.printf("topic = %s, offset = %d, value = %s \n", record.topic(), record.offset(), record.value());
	}
}